package a.f.a;

import a.a.b;
import a.a.hb;
import a.a.kb;
import a.c.*;
import a.c.d;
import a.i.db;
import a.i.y;
import a.i.z;

import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;

class a
  extends a.f.q
{
  static final byte mg = 0;
  static final byte ng = 1;
  static final byte og = 2;
  static final Object pg = "y.layout.circular.CircularLayouter.CIRCULAR_CUSTOM_GROUPS_DPKEY";
  private x qg;
  private x rg;
  private x sg;
  private x tg;
  private x ug;
  private a.c.n vg;
  private a.c.q wg;
  private a.c.n xg;
  private Map yg;
  byte zg;
  byte Ag;
  private a.c.e Bg;
  private y Cg;
  private z Dg;
  private ab Eg;
  
  public a(a.c.q paramq)
  {
    this.wg = paramq;
    this.qg = B();
    this.vg = C();
  }
  
  a.c.bb w(a.c.e parame)
  {
    a.c.bb localbb = (a.c.bb)this.qg.get(parame);
    return localbb;
  }
  
  void a(a.c.e parame, a.c.bb parambb)
  {
    this.qg.a(parame, parambb);
  }
  
  a.c.bb x(a.c.e parame)
  {
    return (a.c.bb)this.tg.get(parame);
  }
  
  public void M()
  {
    int m = e.M;
    boolean bool = e.L;
    if (m == 0) {
      if (this.rg == null) {
        this.rg = B();
      }
    }
    int[] arrayOfInt = new int[this.wg.k() + 1];
    int i = 1;
    w localw = v();
    label126:
    do
    {
      a.c.bb localbb;
      Object localObject1;
      do
      {
        if (!localw.e()) {
          break;
        }
        localbb = w(localw.d());
        localObject1 = localbb.l();
        do
        {
          if (!((w)localObject1).e()) {
            break label126;
          }
          localObject2 = ((w)localObject1).d();
          arrayOfInt[localObject2.f()] = i;
          ((w)localObject1).f();
          if ((m == 0) && (bool)) {
            break;
          }
        } while (!bool);
        localObject1 = new ab();
      } while (m != 0);
      Object localObject2 = localbb.l();
      do
      {
        if (!((w)localObject2).e()) {
          break;
        }
        a.c.e locale1 = ((w)localObject2).d();
        int j = arrayOfInt[locale1.f()];
        if (m != 0) {
          break label314;
        }
        if (bool) {
          break label312;
        }
        a.c.m localm = locale1.n();
        do
        {
          do
          {
            if (!localm.e()) {
              break label264;
            }
            d locald = localm.a();
            a.c.e locale2 = locald.f();
            int k = arrayOfInt[locale2.f()];
            do
            {
              if (bool) {
                break;
              }
            } while (m != 0);
            if (k == j) {
              ((ab)localObject1).c(locald);
            }
            localm.f();
          } while (!bool);
          ((w)localObject2).f();
        } while (m != 0);
      } while (!bool);
      this.rg.a(localw.d(), localObject1);
      localw.f();
      if (m == 0) {
        i++;
      }
    } while (!bool);
    label264:
    label312:
    label314:
    return;
  }
  
  void O()
  {
    int i = e.M;
    boolean bool = e.L;
    this.tg = B();
    this.ug = this.wg.B();
    Object localObject1 = v();
    Object localObject2;
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      if (i == 0)
      {
        if (bool) {
          break label89;
        }
        this.tg.a(localObject2, new a.c.bb());
        ((w)localObject1).f();
      }
    } while (!bool);
    label89:
    localObject1 = w();
    label284:
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      ab localab = t((d)localObject2);
      a.c.m localm = localab.l();
      do
      {
        do
        {
          if (!localm.e()) {
            break label284;
          }
          d locald = localm.a();
          a.c.e locale1 = locald.e();
          a.c.e locale2 = locald.f();
          if (bool) {
            break;
          }
          a.c.e locale3;
          if (!this.ug.getBool(locale1))
          {
            locale3 = (a.c.e)this.sg.get(locale1);
            x(locale3).add(locale1);
            this.ug.a(locale1, true);
          }
          if (i == 0)
          {
            if (!this.ug.getBool(locale2))
            {
              locale3 = (a.c.e)this.sg.get(locale2);
              x(locale3).add(locale2);
              this.ug.a(locale2, true);
            }
            localm.f();
          }
        } while (!bool);
        ((a.c.m)localObject1).f();
      } while (i != 0);
    } while (!bool);
  }
  
  ab y(a.c.e parame)
  {
    return (ab)this.rg.get(parame);
  }
  
  ab t(d paramd)
  {
    return (ab)this.vg.get(paramd);
  }
  
  void a(d paramd, ab paramab)
  {
    this.vg.a(paramd, paramab);
  }
  
  public void a(byte paramByte)
  {
    int i = e.M;
    boolean bool = e.L;
    this.zg = paramByte;
    this.sg = this.wg.B();
    if (i == 0)
    {
      switch (paramByte)
      {
      case 2: 
        a(this.wg.c(pg));
        if (i != 0) {
          return;
        }
        if (!bool) {
          break;
        }
      case 0: 
        x localx = this.wg.B();
        a.a.n.a(this.wg, localx);
        a(localx);
        this.wg.a(localx);
        if (i != 0) {
          return;
        }
        if (!bool) {
          break;
        }
      case 1: 
        Q();
      }
      this.Dg = new z(this.wg, this.sg);
      O();
      R();
      M();
      Y();
    }
  }
  
  protected void a(k paramk)
  {
    c(paramk);
    P();
  }
  
  void c(k paramk)
  {
    int i = e.M;
    boolean bool = e.L;
    HashMap localHashMap = new HashMap();
    Object localObject1 = this.wg.v();
    Object localObject2;
    Object localObject3;
    Object localObject4;
    label239:
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      localObject3 = paramk.get(localObject2);
      a.c.bb localbb;
      if (localObject3 != null)
      {
        if (i == 0) {
          if (!localHashMap.containsKey(localObject3))
          {
            localObject4 = i();
            localHashMap.put(localObject3, localObject4);
            localbb = new a.c.bb();
            this.qg.a(localObject4, localbb);
            localbb.add(localObject2);
            this.sg.a(localObject2, localObject4);
            if (i != 0) {
              continue;
            }
            if (!bool) {
              break label239;
            }
          }
        }
        localObject4 = localHashMap.get(localObject3);
        localbb = (a.c.bb)this.qg.get(localObject4);
        localbb.add(localObject2);
        this.sg.a(localObject2, localObject4);
        if (i != 0) {
          continue;
        }
        if (!bool) {}
      }
      else
      {
        localObject4 = i();
        localbb = new a.c.bb();
        this.qg.a(localObject4, localbb);
        localbb.add(localObject2);
        this.sg.a(localObject2, localObject4);
      }
      ((w)localObject1).f();
    } while (!bool);
    localObject1 = this.wg.w();
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      localObject3 = (a.c.e)this.sg.get(((d)localObject2).e());
      localObject4 = (a.c.e)this.sg.get(((d)localObject2).f());
      if (i == 0)
      {
        if (localObject3 != localObject4)
        {
          d locald = ((a.c.e)localObject3).c((a.c.e)localObject4);
          if ((i != 0) || (locald == null))
          {
            locald = a((a.c.e)localObject3, (a.c.e)localObject4);
            ab localab = new ab();
            localab.add(localObject2);
            a(locald, localab);
            if (i != 0) {
              continue;
            }
            if (!bool) {}
          }
          else
          {
            t(locald).add(localObject2);
          }
        }
        ((a.c.m)localObject1).f();
      }
    } while (!bool);
  }
  
  protected void P()
  {
    int j = e.M;
    boolean bool = e.L;
    a.c.n localn = C();
    Object localObject1 = w();
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      if (bool) {
        break label82;
      }
      int i = t((d)localObject2).size();
      localn.a(localObject2, 1.0D / (i * i));
      ((a.c.m)localObject1).f();
    } while (!bool);
    label82:
    localObject1 = hb.a(this, localn);
    Object localObject2 = new boolean[l()];
    this.Eg = new ab();
    a.c.m localm = ((ab)localObject1).l();
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        localObject2[localm.a().d()] = 1;
        localm.f();
        if (j != 0) {
          break label170;
        }
        if (bool) {
          break label163;
        }
      } while (!bool);
    } while (j != 0);
    localm = w();
    label163:
    label170:
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      if ((j == 0) && (bool)) {
        return;
      }
      if (j == 0)
      {
        if (localObject2[locald.d()] == 0) {
          this.Eg.add(locald);
        }
        localm.f();
      }
    } while (!bool);
    this.Cg = new y(this);
    this.Cg.a(this.Eg);
    if (j == 0) {
      a(localn);
    }
  }
  
  void Q()
  {
    int n = e.M;
    boolean bool = e.L;
    x localx = this.wg.B();
    a.c.n localn = db.b(new int[this.wg.l()]);
    int i = a.a.m.a(this.wg, localn, localx);
    ab[] arrayOfab1 = a.a.m.a(this.wg, localn, i);
    HashMap localHashMap = new HashMap();
    boolean[] arrayOfBoolean = new boolean[this.wg.k()];
    w localw = this.wg.v();
    Object localObject2;
    Object localObject3;
    do
    {
      if (!localw.e()) {
        break;
      }
      localObject1 = localw.d();
      if (bool) {
        break label188;
      }
      if (localx.getBool(localObject1))
      {
        localObject2 = i();
        localObject3 = new a.c.bb();
        ((a.c.bb)localObject3).add(localObject1);
        this.qg.a(localObject2, localObject3);
        localHashMap.put(localObject1, localObject2);
        this.sg.a(localObject1, localObject2);
      }
      localw.f();
    } while (!bool);
    label188:
    int j = 0;
    Object localObject4;
    Object localObject5;
    label456:
    do
    {
      if (j >= arrayOfab1.length) {
        break;
      }
      if (n != 0) {
        break label568;
      }
      localObject1 = arrayOfab1[j];
      if (bool) {
        break label565;
      }
      if (((ab)localObject1).size() == 1)
      {
        localObject2 = ((ab)localObject1).m();
        if ((n != 0) || ((localx.getBool(((d)localObject2).e())) && (localx.getBool(((d)localObject2).f()))))
        {
          localObject3 = a((a.c.e)localHashMap.get(((d)localObject2).e()), (a.c.e)localHashMap.get(((d)localObject2).f()));
          localObject4 = new ab();
          ((ab)localObject4).add(localObject2);
          a((d)localObject3, (ab)localObject4);
          if (n != 0) {
            continue;
          }
          if (!bool) {
            break label550;
          }
        }
      }
      localObject2 = i();
      localObject3 = new a.c.bb();
      localObject4 = ((ab)localObject1).l();
      do
      {
        if (!((a.c.m)localObject4).e()) {
          break label522;
        }
        localObject5 = ((a.c.m)localObject4).a();
        a.c.e locale1 = ((d)localObject5).e();
        if (bool) {
          break;
        }
        if (arrayOfBoolean[locale1.f()] == 0)
        {
          if (n != 0) {
            break label456;
          }
          if (!localx.getBool(locale1))
          {
            ((a.c.bb)localObject3).add(locale1);
            arrayOfBoolean[locale1.f()] = true;
            this.sg.a(locale1, localObject2);
          }
        }
        locale1 = ((d)localObject5).f();
        if (n == 0)
        {
          if (arrayOfBoolean[locale1.f()] == 0)
          {
            if (n != 0) {
              continue;
            }
            if (!localx.getBool(locale1))
            {
              ((a.c.bb)localObject3).add(locale1);
              arrayOfBoolean[locale1.f()] = true;
              this.sg.a(locale1, localObject2);
            }
          }
          ((a.c.m)localObject4).f();
        }
      } while (!bool);
      this.qg.a(localObject2, localObject3);
      if (n != 0) {
        break;
      }
      localHashMap.put(localObject1, localObject2);
      j++;
    } while (!bool);
    label522:
    label550:
    label565:
    label568:
    ab[] arrayOfab2 = new ab[this.wg.m()];
    Object localObject1 = new a.c.e[2];
    int k = 0;
    label685:
    label687:
    label880:
    do
    {
      do
      {
        if (k >= arrayOfab1.length) {
          break;
        }
        localObject3 = arrayOfab1[k];
        localObject4 = (a.c.e)localHashMap.get(localObject3);
        if (bool) {
          return;
        }
        if (localObject4 != null)
        {
          localObject5 = ((ab)localObject3).l();
          do
          {
            do
            {
              if (!((a.c.m)localObject5).e()) {
                break;
              }
              arrayOfab2[localObject5.a().d()] = localObject3;
              if (n != 0) {
                break label687;
              }
              ((a.c.m)localObject5).f();
              if (bool) {
                break label685;
              }
            } while (!bool);
          } while (n != 0);
          localObject5 = ((ab)localObject3).l();
          do
          {
            do
            {
              if (!((a.c.m)localObject5).e()) {
                break label928;
              }
              localObject1[0] = ((a.c.m)localObject5).a().e();
              localObject1[1] = ((a.c.m)localObject5).a().f();
              if (bool) {
                break;
              }
              int m = 0;
              do
              {
                if (m >= 2) {
                  break label911;
                }
                Object localObject6 = localObject1[m];
                a.c.e locale2 = (a.c.e)localHashMap.get(localObject6);
                if (bool) {
                  break;
                }
                if ((localx.getBool(localObject6)) && (locale2.c((a.c.e)localObject4) == null))
                {
                  ab localab = new ab();
                  Object localObject7 = localObject6.l();
                  do
                  {
                    if (!((a.c.m)localObject7).e()) {
                      break label880;
                    }
                    d locald = ((a.c.m)localObject7).a();
                    a.c.e locale3 = locald.a(localObject6);
                    if (bool) {
                      break;
                    }
                    if ((!localx.getBool(locale3)) && ((n != 0) || (arrayOfab2[locald.d()] == localObject3))) {
                      localab.add(locald);
                    }
                    ((a.c.m)localObject7).f();
                  } while (!bool);
                  localObject7 = a((a.c.e)localObject4, locale2);
                  if (n != 0) {
                    break label950;
                  }
                  a((d)localObject7, localab);
                }
                m++;
              } while (!bool);
              ((a.c.m)localObject5).f();
            } while (n != 0);
          } while (!bool);
        }
        k++;
      } while (n != 0);
    } while (!bool);
    label911:
    label928:
    if (n == 0) {
      label950:
      this.wg.a(localx);
    }
  }
  
  void R()
  {
    int i = e.M;
    boolean bool = e.L;
    this.yg = new HashMap();
    if (i == 0)
    {
      if (this.zg == 1)
      {
        a.c.m localm1 = w();
        label202:
        label215:
        do
        {
          if (!localm1.e()) {
            break;
          }
          d locald1 = localm1.a();
          ab localab = t(locald1);
          do
          {
            if (bool) {
              return;
            }
            if (i != 0) {
              break label215;
            }
            if (localab.size() > 1)
            {
              a.c.m localm2 = localab.l();
              a.c.e locale1 = w(locald1.f()).m();
              Object localObject = localm2.a().a(locale1);
              localm2.f();
              do
              {
                if (!localm2.e()) {
                  break label202;
                }
                a.c.e locale2 = localm2.a().a(locale1);
                if (bool) {
                  break;
                }
                if (((a.c.e)localObject).c(locale2) == null)
                {
                  d locald2 = this.wg.a((a.c.e)localObject, locale2);
                  this.yg.put(locald2, Boolean.TRUE);
                }
                localObject = locale2;
                localm2.f();
              } while (!bool);
            }
            localm1.f();
          } while (i != 0);
        } while (!bool);
      }
      if (i != 0) {}
    }
    else
    {
      this.Dg.a(this.sg);
    }
  }
  
  void S()
  {
    a.i.n.a("   Nodes " + new a.c.bb(this.wg.v()));
    a.i.n.a("   Edges " + new ab(this.wg.w()));
  }
  
  void T()
  {
    int i = e.M;
    boolean bool = e.L;
    do
    {
      a.c.m localm = this.wg.w();
      while (!bool)
      {
        if (!localm.e()) {
          break;
        }
        if (i == 0)
        {
          if (this.yg.containsKey(localm.a())) {
            this.wg.a(localm.a());
          }
          localm.f();
        }
      }
    } while (i != 0);
  }
  
  ab a(x paramx, ab[] paramArrayOfab)
  {
    int k = e.M;
    boolean bool = e.L;
    Object localObject = null;
    int i = -1;
    int j = 0;
    do
    {
      if (j >= paramArrayOfab.length) {
        break;
      }
      ab localab = paramArrayOfab[j];
      if (bool) {
        break label70;
      }
      if (k == 0)
      {
        if (localab.size() > i)
        {
          localObject = localab;
          i = localab.size();
        }
        j++;
      }
    } while (!bool);
    label70:
    return localObject;
  }
  
  void U()
  {
    int i = e.M;
    boolean bool = e.L;
    Object localObject1 = v();
    Object localObject2;
    Object localObject3;
    Object localObject4;
    label151:
    label153:
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      a.i.n.b("node " + localObject2 + ", subnodes-> [");
      if (bool) {
        break label157;
      }
      localObject3 = w((a.c.e)localObject2);
      localObject4 = ((a.c.bb)localObject3).l();
      do
      {
        do
        {
          if (!((w)localObject4).e()) {
            break;
          }
          a.i.n.b(" " + ((w)localObject4).d());
          ((w)localObject4).f();
          if (i != 0) {
            break label153;
          }
          if (bool) {
            break label151;
          }
        } while (!bool);
        a.i.n.a("]");
      } while (i != 0);
      ((w)localObject1).f();
    } while (!bool);
    label157:
    localObject1 = w();
    label292:
    label294:
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      a.i.n.b("edge " + localObject2 + ", subedges-> [");
      localObject3 = t((d)localObject2);
      localObject4 = ((ab)localObject3).l();
      do
      {
        do
        {
          if (!((a.c.m)localObject4).e()) {
            break;
          }
          a.i.n.b(" " + ((a.c.m)localObject4).a());
          ((a.c.m)localObject4).f();
          if (i != 0) {
            break label294;
          }
          if (bool) {
            break label292;
          }
        } while (!bool);
        a.i.n.a("]");
      } while (i != 0);
      ((a.c.m)localObject1).f();
    } while (!bool);
  }
  
  void V()
  {
    T();
    this.wg.a(this.sg);
    this.wg.a(this.ug);
  }
  
  protected void W()
  {
    int j = e.M;
    boolean bool = e.L;
    int i = -1;
    Object localObject = null;
    w localw = v();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      if (j != 0) {
        return;
      }
      if (bool) {
        break label95;
      }
      if (j == 0)
      {
        if (w(locale).size() > i)
        {
          localObject = locale;
          i = w(locale).size();
        }
        localw.f();
      }
    } while (!bool);
    if (j == 0) {
      label95:
      this.Bg = localObject;
    }
  }
  
  public a.c.e X()
  {
    return this.Bg;
  }
  
  void Y()
  {
    W();
    ab localab = kb.a(this, this.Bg);
  }
  
  void Z()
  {
    a(null, new Comparator()
    {
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        int k = e.M;
        d locald1 = (d)paramAnonymousObject1;
        d locald2 = (d)paramAnonymousObject2;
        int i = a.this.xg.getInt(locald1);
        int j = a.this.xg.getInt(locald2);
        if (k == 0)
        {
          if (i > j) {
            return 1;
          }
          if (k != 0) {}
        }
        else if (i < j)
        {
          return -1;
        }
        return 0;
      }
    });
  }
  
  private void ab()
  {
    int j = e.M;
    boolean bool = e.L;
    if (j == 0) {
      if (!kb.d(this)) {
        throw new IllegalArgumentException("Graph must be rooted tree!");
      }
    }
    x localx1 = B();
    Object localObject1 = v();
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      if (j == 0)
      {
        if (localObject2 != this.Bg) {
          localx1.a(localObject2, ((a.c.e)localObject2).p().d());
        }
        ((w)localObject1).f();
      }
    } while (!bool);
    localObject1 = B();
    Object localObject2 = new a.c.bb();
    ((a.c.bb)localObject2).add(this.Bg);
    a.c.bb[] arrayOfbb = b.a(this, (a.c.bb)localObject2, (x)localObject1);
    a.c.bb localbb = new a.c.bb(v());
    a.i.n.a("Now calculating child order:");
    this.Cg.g();
    z localz = new z(this, localx1);
    this.xg = C();
    x localx2 = B();
    int i = 0;
    Object localObject3;
    Object localObject4;
    label307:
    label309:
    do
    {
      if (i >= arrayOfbb.length) {
        break;
      }
      localObject3 = arrayOfbb[i];
      if (bool) {
        break label332;
      }
      localObject4 = ((a.c.bb)localObject3).l();
      do
      {
        if (!((w)localObject4).e()) {
          break;
        }
        a.c.e locale = ((w)localObject4).d();
        localz.c(locale);
        a.i.n.a("   Visiting node " + locale);
        a.i.n.a("   Current partition ");
        U();
        a.i.n.a("-----------------------------------");
        c(localx2);
        ((w)localObject4).f();
        if (j != 0) {
          break label309;
        }
        if (bool) {
          break label307;
        }
      } while (!bool);
      if (j == 0) {
        i++;
      }
    } while (!bool);
    localz.g();
    this.Cg.a(this.Eg);
    label332:
    w localw = v();
    label427:
    label429:
    do
    {
      do
      {
        if (!localw.e()) {
          break label432;
        }
        localObject3 = localw.d();
        if (bool) {
          return;
        }
        localObject4 = ((a.c.e)localObject3).h();
        do
        {
          if (localObject4 == null) {
            break;
          }
          this.xg.a(localObject4, localx2.getInt(((d)localObject4).f()));
          localObject4 = ((d)localObject4).i();
          if (j != 0) {
            break label429;
          }
          if (bool) {
            break label427;
          }
        } while (!bool);
      } while (j != 0);
      localw.f();
    } while (!bool);
    label432:
    if (j == 0) {
      a(localx2);
    }
  }
  
  private void c(x paramx)
  {
    int m = e.M;
    boolean bool = e.L;
    x localx = B();
    int i = a.a.m.a(this, localx);
    a.i.n.a("    - Reordering children");
    z localz = new z(this, localx);
    int j = 0;
    int k = 0;
    if (k < i)
    {
      localz.c(new Integer(k));
      a.i.n.a("    - Current Component " + k);
      U();
      a.i.n.a("---------------------------");
    }
    do
    {
      a(paramx, j);
      j += j();
      k++;
      if ((m == 0) && (bool)) {
        return;
      }
      if (!bool) {
        break;
      }
      localz.g();
      U();
    } while (m != 0);
    a(localx);
  }
  
  private void a(x paramx, int paramInt)
  {
    int i1 = e.M;
    boolean bool = e.L;
    a.c.bb localbb1 = a.a.bb.a(a.a.bb.a(this));
    a.i.n.a(3, "      - Found path " + localbb1);
    a.c.bb localbb2 = new a.c.bb();
    boolean[] arrayOfBoolean = new boolean[j()];
    int[] arrayOfInt = new int[j()];
    int i = 0;
    w localw1 = localbb1.l();
    do
    {
      do
      {
        if (!localw1.e()) {
          break;
        }
        a.c.e locale1 = localw1.d();
        arrayOfBoolean[locale1.f()] = true;
        arrayOfInt[locale1.f()] = i;
        localw1.f();
        i++;
      } while (!bool);
    } while (i1 != 0);
    int j = localbb1.size();
    int k = -1;
    w localw2 = v();
    a.c.e locale2;
    label357:
    label359:
    do
    {
      do
      {
        if (!localw2.e()) {
          break;
        }
        locale2 = localw2.d();
        int m = 0;
        int n = 0;
        if (bool) {
          break label499;
        }
        if (arrayOfBoolean[locale2.f()] == 0)
        {
          a.i.n.a(4, "      - Augmenting node " + locale2);
          w localw3 = locale2.o();
          do
          {
            if (!localw3.e()) {
              break;
            }
            a.c.e locale3 = localw3.d();
            if (i1 != 0) {
              break label359;
            }
            if (bool) {
              break label357;
            }
            if (arrayOfBoolean[locale3.f()] != 0)
            {
              m += arrayOfInt[locale3.f()] - k;
              n += j - arrayOfInt[locale3.f()];
            }
            localw3.f();
          } while (!bool);
          a.i.n.a("       + Weight for front is " + m);
          a.i.n.a("       + Weight for back is " + n);
          if (i1 == 0)
          {
            if (m < n)
            {
              arrayOfInt[locale2.f()] = k;
              k--;
              if (i1 != 0) {
                break label436;
              }
              if (!bool) {}
            }
            else
            {
              arrayOfInt[locale2.f()] = j;
            }
          }
          else {
            j++;
          }
          a.i.n.a("       + Set to position " + arrayOfInt[locale2.f()]);
          arrayOfBoolean[locale2.f()] = true;
          a.i.n.a("       + Free positions at " + k + " and " + j);
        }
        localw2.f();
      } while (!bool);
    } while (i1 != 0);
    label436:
    localw2 = v();
    label499:
    do
    {
      if (!localw2.e()) {
        break;
      }
      locale2 = localw2.d();
      paramx.a(locale2, arrayOfInt[locale2.f()] - k - 1 + paramInt);
      a.i.n.a("      - Current order for " + locale2 + " is " + paramx.getInt(locale2));
      localw2.f();
    } while (!bool);
  }
  
  public void bb()
  {
    this.Dg.b();
  }
  
  public void cb()
  {
    this.Dg.g();
  }
  
  public void z(a.c.e parame)
  {
    this.Dg.b(parame);
  }
  
  public void A(a.c.e parame)
  {
    this.Dg.a(parame);
  }
  
  public a.c.e B(a.c.e parame)
  {
    return (a.c.e)this.sg.get(parame);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.a.a

 * JD-Core Version:    0.7.0.1

 */